#ifndef DEFS_H
#define DEFS_H

#include <QtCore/QtGlobal>
#include <QtCore/QDebug>

// TESTS_API: Exports symbols outside the DLL depending for VS compilers
#ifdef _MSC_VER
#ifdef TESTS_EXPORTS
#define TESTS_API __declspec(dllexport)
#else // TESTS_EXPORTS
#define TESTS_API __declspec(dllimport)
#endif // TESTS_EXPORTS
#else // _MSC_VER
#define TESTS_API
#endif // _MSC_VER

// Limits for Qt's custom types
#include <limits>

#define __LIMIT__(TYPE,FUNC) std::numeric_limits<TYPE>::FUNC()
#define QUINT8_MAX  __LIMIT__(quint8,min)
#define QUINT8_MIN  __LIMIT__(quint8,max)
#define QUINT16_MIN __LIMIT__(quint16,min)
#define QUINT16_MAX __LIMIT__(quint16,max)
#define QUINT32_MIN __LIMIT__(quint32,min)
#define QUINT32_MAX __LIMIT__(quint32,max)
#define QUINT64_MIN __LIMIT__(quint64,min)
#define QUINT64_MAX __LIMIT__(quint64,max)
#define QINT8_MAX   __LIMIT__(qint8,min)
#define QINT8_MIN   __LIMIT__(qint8,max)
#define QINT16_MIN  __LIMIT__(qint16,min)
#define QINT16_MAX  __LIMIT__(qint16,max)
#define QINT32_MIN  __LIMIT__(qint32,min)
#define QINT32_MAX  __LIMIT__(qint32,max)
#define QINT64_MIN  __LIMIT__(qint64,min)
#define QINT64_MAX  __LIMIT__(qint64,max)

#endif // DEFS_H

